<template>
  <demoBlock title="选项过滤器" padding>
    <vcu-datetime-picker
      v-model="currentDate"
      title="请选择"
      type="time"
      :filter="filter"
    />
  </demoBlock>
</template>


<script>
import { defineComponent, ref } from "vue";

export default defineComponent({
  setup() {
    const currentDate = ref('12:00');
    const filter = (type, options) => {
      if (type === 'minute') {
        return options.filter((option) => Number(option) % 5 === 0);
      }
      return options;
    };
    return {
      currentDate,
      filter
    };
  },
});
</script>